package com.mymall.coupon;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@MapperScan("com.mymall.coupon.dao")
@EnableDiscoveryClient // 开启服务注册发现
public class MymallCouponApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext =  SpringApplication.run(MymallCouponApplication.class, args);

        String userName = applicationContext.getEnvironment().getProperty("coupons.user.name");
        System.err.println("user name :" +userName);
    }

}
